package 八大排序;

import java.util.Scanner;

/**
 * 
 * @author ：soulstones
 * @version ：2019年9月25日 下午9:56:12 @Description：
 * 
 * 
 */
public class QuickSort {

	public static void sort(int[] arr) {
		quickSort(arr, 0, arr.length - 1);
	}

	public static int quickSort(int[] arr, int left, int right) {
		if (left >= 0 && right <= arr.length - 1 && left < right) {
			int low = left;
			int high = right;
			int key = arr[left];

			while (left < right) {
				while (left < right && arr[right] >= key) {
					right--;
					arr[left] = arr[right];
				}
				while (left < right && arr[left] <= key) {
					left++;
					arr[right] = arr[left];
				}
				arr[right] = key;
				quickSort(arr, low, left - 1);
				quickSort(arr, left + 1, high);
			}
		}
		return right;
	}

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String[] strings = scanner.nextLine().split(" ");
		int arr[] = new int[strings.length];
		for (int i = 0; i < arr.length; i++) {
			arr[i] = Integer.parseInt(strings[i]);
		}
		System.out.println();
		
	}
}
